﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmCajaCierre.aspx.cs" Inherits="UI.Tesoreria.frmCajaCierre" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            width: 101px;
        }
    </style>

    <script type="text/javascript">

        //Función que permite solo Números
        function ValidaSoloNumeros() {
            if ((event.keyCode < 48) || (event.keyCode > 57))
                event.returnValue = false;
        }

        //Función que permite solo Texto o Letras
        function txNombres() {
            if ((event.keyCode != 32) && (event.keyCode < 65) || (event.keyCode > 90) && (event.keyCode < 97) || (event.keyCode > 122))
                event.returnValue = false;
        }

        function isNumberOrLetter() {
            if (((event.keyCode < 48) || (event.keyCode > 57)) && ((event.keyCode != 32) && (event.keyCode < 65) || (event.keyCode > 90) && (event.keyCode < 97) || (event.keyCode > 122)))
                event.returnValue = false;
        }

        function ValidarNumFloat(e, obj) {
            tecla = (document.all) ? e.keyCode : e.which;
            if (tecla == 8) return true;

            Punto = obj.value.split('.');
            if (Punto.length >= 2) {
                patron = /[0-9]/;
            } else
                patron = /[0-9.]/;
            te = String.fromCharCode(tecla);

            return patron.test(te);
        }
   
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


<asp:UpdatePanel ID="panelActualizar" runat="server">
<%--    <Triggers>
        <asp:PostBackTrigger ControlID="GridCajaDiaria"/>
    </Triggers>--%>
    <ContentTemplate>
    <asp:Panel ID="Panel1" runat="server">
          
     <table  width="500px">                                                            
                    <tr>                        
                        <td class="style10">                            
                            <asp:Label ID="Label6" runat="server" Text="CAJA"></asp:Label>                            
                        </td>                        
                        <td class="styleCOntrolIngreso">
                        <asp:DropDownList ID="ddlCajaCierre" runat="server" style="margin-left: 0px" 
                                Width="193px" AutoPostBack="True" onselectedindexchanged="ddlCajaCierre_SelectedIndexChanged"   
                                ></asp:DropDownList>                            
                        </td>
                        <td>
                          
                        </td>
                        <td><asp:CheckBox ID="CheckBox1" runat="server" /><asp:Label ID="Label2" runat="server" Text="ACTIVO"></asp:Label>
                        </td> 
                        <td><asp:ImageButton ID="btnGuardarCierre" runat="server" 
                        ImageUrl="~/Imagenes/Iconos/accept.png" onclick="btnGuardarCierre_Click" /></td>                       
                    </tr>
                    <tr>                        
                        <td class="style10">                            
                               <asp:Label ID="Label4" runat="server" Text="FECHA APERTURA" Width="110px"></asp:Label>                        
                        </td>                        
                        <td class="styleCOntrolIngreso">                            
                             <asp:TextBox ID="txtFechaApertura" Width="100px" runat="server"></asp:TextBox>
                            <asp:CalendarExtender ID="txtFechaApertura_CalendarExtender" runat="server" Enabled="True"
                                Format="dd/MM/yyyy" TargetControlID="txtFechaApertura">
                            </asp:CalendarExtender>
                            </td>
                        <td class="style10">                            
                               <asp:Label ID="Label1" runat="server" Text="FECHA CIERRE" Width="95px"></asp:Label>                        
                        </td>
                        <td class="styleCOntrolIngreso">
                          <asp:TextBox ID="txtFechaCierre" runat="server" Width="100px"></asp:TextBox>
                            <asp:CalendarExtender ID="txtFechaCierre_CalendarExtender" runat="server" Enabled="True"
                                Format="dd/MM/yyyy" TargetControlID="txtFechaCierre">
                            </asp:CalendarExtender>
                         </td>
                         <td></td>                          
                    </tr>                                                                                                                                                                      
                </table>                
     <br />           
     <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="700px">
     <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">            
            <HeaderTemplate>                
                ARQUEO DE CAJA
            </HeaderTemplate>            
            <ContentTemplate>                                                                                           
                <br />                                                
                <table  width="500px">                                                            
                    <tr>                        
                        <td class="style2">                            
                           <asp:Label ID="Label3" runat="server" Text="SALDO INICIAL" Width="100px"></asp:Label>                              
                        </td>                        
                        <td> <asp:TextBox ID="txtSaldoInicial" runat="server" Height="20px" Width="83px" style="text-align:right;" onkeypress="return ValidarNumFloat(event,this);"></asp:TextBox>                                                
                        </td>
                        <td colspan="2">                          
                        </td>                                     
                    </tr>
                    <tr>                        
                        <td colspan="2">                            
                              <asp:Panel ID="pnlEntradas" runat="server" GroupingText="Entradas" Width="330px">
                               <asp:Label ID="LabelErrorListadoEntradas" runat="server" Font-Bold="True" 
                               ForeColor="Red"></asp:Label>                                                                                                        
                                 <asp:GridView ID="grvEntradaCaja" runat="server" 
                                    AutoGenerateColumns="False" Width="300px"
                                       onrowdatabound="grvEntradaCaja_RowDataBound">
                                    <Columns>
                                        <asp:BoundField DataField="Numeracion" HeaderText="Numeracion">
                                        <ItemStyle HorizontalAlign="Center" /></asp:BoundField>          
                                        <asp:BoundField DataField="Concepto" HeaderText="Concepto">
                                        <ItemStyle HorizontalAlign="Center" /></asp:BoundField>          
                                        <asp:BoundField DataField="Monto" HeaderText="Monto"><ItemStyle HorizontalAlign="Right" /></asp:BoundField>                        
                                    </Columns>                                   
                                </asp:GridView><br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
                                 &nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp                                                                                   
                                  <asp:Label ID="lblTotalEntrada" runat="server" Text="Label"></asp:Label>
                             </asp:Panel>      
                        </td>                        
                        <td colspan="2">                            
                            <asp:Panel ID="pnlSalidas" runat="server" GroupingText="Salidas" Width="330px">
                              <asp:Label ID="LabelErrorListadoSalidas" runat="server" Font-Bold="True" 
                               ForeColor="Red"></asp:Label>                                                                      
                                <asp:GridView ID="grvSalidadaCaja" runat="server" 
                                    AutoGenerateColumns="False" Width="300px">
                                    <Columns>
                                        <asp:BoundField DataField="Numeracion" HeaderText="Numeracion">
                                        <ItemStyle HorizontalAlign="Center" /></asp:BoundField>          
                                        <asp:BoundField DataField="Concepto" HeaderText="Concepto">
                                        <ItemStyle HorizontalAlign="Center" /></asp:BoundField>          
                                        <asp:BoundField DataField="Monto" HeaderText="Monto"><ItemStyle HorizontalAlign="Right" /></asp:BoundField>                             
                                    </Columns>
                                </asp:GridView>
                               <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
                                 &nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp                                                                                         
                                  <asp:Label ID="lblTotalSalida" runat="server" Text="Label"></asp:Label>
                             </asp:Panel>     
                        </td>                                                                      
                    </tr>
                     <tr>                                                
                        <td colspan="2">
                        <td class="style2">                            
                           <asp:Label ID="Label5" runat="server" Text="SALDO FINAL SISTEMA: " Width="160px"></asp:Label>                              
                        </td>                        
                        <td> <asp:TextBox ID="txtSaldoFinalSist" runat="server" Height="20px" Width="83px" style="text-align:right;" onkeypress="return ValidarNumFloat(event,this);"></asp:TextBox>                                                
                        </td>                          
                        </td>                                     
                    </tr>
                     <tr>
                     <td colspan="2">                          
                        </td>                            
                        <td class="style2">                            
                           <asp:Label ID="Label7" runat="server" Text="SALDO FINAL REAL: " Width="140px"></asp:Label>                              
                        </td>                        
                        <td> <asp:TextBox ID="txtsaldoFinalReal" runat="server" Height="20px" Width="83px" style="text-align:right;" onkeypress="return ValidarNumFloat(event,this);"></asp:TextBox>                                                
                        </td>                                                         
                    </tr>
                      <tr>
                     <td colspan="2">
                     <asp:Label ID="lblErrorDiferencia" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>                             
                        </td>                            
                        <td class="style2">                            
                           <asp:Label ID="Label9" runat="server" Text="DIRERENCIA: " Width="140px"></asp:Label>                              
                        </td>                        
                        <td> <asp:TextBox ID="txtDiferencia" runat="server" Height="20px" Width="83px" style="text-align:right;" onkeypress="return ValidarNumFloat(event,this);"></asp:TextBox>                                                
                        </td>                                                         
                    </tr>
                    <tr>
                       <td >                            
                           <asp:Label ID="Label8" runat="server" Text="Observación: " Width="80px"></asp:Label>                              
                        </td>  
                        <td colspan="3">
                            <asp:TextBox ID="txtObservacion" runat="server" TextMode="MultiLine" Width="500px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <br />                
            </ContentTemplate>            
        </asp:TabPanel>
     </asp:TabContainer>

     <br />
      
   
      <br />

    </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel> 

</asp:Content>
